<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>计算属性  set   get方法</title>
		<script src="../../vue/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<p>{{fullName}}</p>
		</div>
		<script type="text/javascript">
		 var app = new Vue({
			 el:'#app',
			 data:{
				 firstName:'xie',
				 lastName:'ying'
			 },
			 computed:{
				 fullName:{
					 /* 一般省略不写   写成另外应中方式
					 
					 fullName:function(){
						 return this.firstName+''+this.lastName
					 }
					 
					 */
					 set:function(){
						 console.log("----------");
					 },
					 get:function(){
						 return 'abc'
					 }
				 }
			 }
		 })	;
		</script>
	</body>
</html>
